package com.example.webdownloadserver.handle.download;

import com.example.webdownloadserver.base.TaskJobException;
import com.example.webdownloadserver.beans.UserExcel;
import com.example.webdownloadserver.constants.TaskConfigConstants;
import com.example.webdownloadserver.core.DownloadHandler;
import com.example.webdownloadserver.core.ITaskProcess;
import com.example.webdownloadserver.handle.DownloadHandlerAbstract;
import com.example.webdownloadserver.service.DownloadUserService;
import com.example.webdownloadserver.vo.TaskCenter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @ClassName DownloadUserHandler
 * @Description TODO
 * @Auth ying.xiao
 * @Date 2021/8/10
 * @Version 1.0.0
 */
@Component
@DownloadHandler(handler = TaskConfigConstants.USER_DOWNLOAD)
public class DownloadUserHandler  extends DownloadHandlerAbstract<DownloadUserService> implements ITaskProcess {

    @Autowired
    private DownloadUserService downloadUserService;

    @Override
    public void handler(TaskCenter taskCenter) throws TaskJobException {
        abstractHandler(downloadUserService, UserExcel.class,taskCenter,"DownloadUserHandler","用户信息下载","user/download");
    }
}
